package com.ymttest.database.mapping.godmch;

import com.ymttest.database.model.godmch.subscriptioncharge;
import com.ymttest.database.model.godmch.subscriptionchargeExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface subscriptionchargeMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table subscriptioncharge
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @SelectProvider(type=subscriptionchargeSqlProvider.class, method="countByExample")
    int countByExample(subscriptionchargeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table subscriptioncharge
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @DeleteProvider(type=subscriptionchargeSqlProvider.class, method="deleteByExample")
    int deleteByExample(subscriptionchargeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table subscriptioncharge
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @Delete({
        "delete from subscriptioncharge",
        "where SubscriptionChargeId = #{subscriptionChargeId,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String subscriptionChargeId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table subscriptioncharge
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @Insert({
        "insert into subscriptioncharge (SubscriptionChargeId, MchId, ",
        "FuncType, FuncPackageId, ",
        "ChargeAmount, ChargeStatus, ",
        "ExpirationDay, PaymentId, ",
        "ChargeTime, CreateTime, ",
        "UpdateTime)",
        "values (#{subscriptionChargeId,jdbcType=VARCHAR}, #{mchId,jdbcType=INTEGER}, ",
        "#{funcType,jdbcType=INTEGER}, #{funcPackageId,jdbcType=INTEGER}, ",
        "#{chargeAmount,jdbcType=DECIMAL}, #{chargeStatus,jdbcType=INTEGER}, ",
        "#{expirationDay,jdbcType=INTEGER}, #{paymentId,jdbcType=VARCHAR}, ",
        "#{chargeTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(subscriptioncharge record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table subscriptioncharge
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @InsertProvider(type=subscriptionchargeSqlProvider.class, method="insertSelective")
    int insertSelective(subscriptioncharge record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table subscriptioncharge
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @SelectProvider(type=subscriptionchargeSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="SubscriptionChargeId", property="subscriptionChargeId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="MchId", property="mchId", jdbcType=JdbcType.INTEGER),
        @Result(column="FuncType", property="funcType", jdbcType=JdbcType.INTEGER),
        @Result(column="FuncPackageId", property="funcPackageId", jdbcType=JdbcType.INTEGER),
        @Result(column="ChargeAmount", property="chargeAmount", jdbcType=JdbcType.DECIMAL),
        @Result(column="ChargeStatus", property="chargeStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="ExpirationDay", property="expirationDay", jdbcType=JdbcType.INTEGER),
        @Result(column="PaymentId", property="paymentId", jdbcType=JdbcType.VARCHAR),
        @Result(column="ChargeTime", property="chargeTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<subscriptioncharge> selectByExample(subscriptionchargeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table subscriptioncharge
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @Select({
        "select",
        "SubscriptionChargeId, MchId, FuncType, FuncPackageId, ChargeAmount, ChargeStatus, ",
        "ExpirationDay, PaymentId, ChargeTime, CreateTime, UpdateTime",
        "from subscriptioncharge",
        "where SubscriptionChargeId = #{subscriptionChargeId,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="SubscriptionChargeId", property="subscriptionChargeId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="MchId", property="mchId", jdbcType=JdbcType.INTEGER),
        @Result(column="FuncType", property="funcType", jdbcType=JdbcType.INTEGER),
        @Result(column="FuncPackageId", property="funcPackageId", jdbcType=JdbcType.INTEGER),
        @Result(column="ChargeAmount", property="chargeAmount", jdbcType=JdbcType.DECIMAL),
        @Result(column="ChargeStatus", property="chargeStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="ExpirationDay", property="expirationDay", jdbcType=JdbcType.INTEGER),
        @Result(column="PaymentId", property="paymentId", jdbcType=JdbcType.VARCHAR),
        @Result(column="ChargeTime", property="chargeTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    subscriptioncharge selectByPrimaryKey(String subscriptionChargeId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table subscriptioncharge
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @UpdateProvider(type=subscriptionchargeSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") subscriptioncharge record, @Param("example") subscriptionchargeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table subscriptioncharge
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @UpdateProvider(type=subscriptionchargeSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") subscriptioncharge record, @Param("example") subscriptionchargeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table subscriptioncharge
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @UpdateProvider(type=subscriptionchargeSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(subscriptioncharge record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table subscriptioncharge
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @Update({
        "update subscriptioncharge",
        "set MchId = #{mchId,jdbcType=INTEGER},",
          "FuncType = #{funcType,jdbcType=INTEGER},",
          "FuncPackageId = #{funcPackageId,jdbcType=INTEGER},",
          "ChargeAmount = #{chargeAmount,jdbcType=DECIMAL},",
          "ChargeStatus = #{chargeStatus,jdbcType=INTEGER},",
          "ExpirationDay = #{expirationDay,jdbcType=INTEGER},",
          "PaymentId = #{paymentId,jdbcType=VARCHAR},",
          "ChargeTime = #{chargeTime,jdbcType=TIMESTAMP},",
          "CreateTime = #{createTime,jdbcType=TIMESTAMP},",
          "UpdateTime = #{updateTime,jdbcType=TIMESTAMP}",
        "where SubscriptionChargeId = #{subscriptionChargeId,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(subscriptioncharge record);
}